package com.cloud.tsp.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cloud.api.domain.tsp.VehicleDept;
import com.cloud.tsp.config.MysqlConfig;
import com.cloud.tsp.mapper.VehicleDeptMapper;
import com.cloud.tsp.service.IVehicleDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import jakarta.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author haohaibo
 * @since 2023-12-01
 */
@Service("vehicleDeptService")
public class VehicleDeptServiceImpl extends ServiceImpl<VehicleDeptMapper, VehicleDept> implements IVehicleDeptService {

    @Resource
    private VehicleDeptMapper vehicleDeptMapper;
    @Autowired
    private MysqlConfig mysqlConfig;

    @Override
    public List<VehicleDept> selectByDept(String deptId) {
        return vehicleDeptMapper.selectByDept(deptId,mysqlConfig.getDataSource());
    }
}